package com.six.remark.controller;


import com.six.core.util.UploadUtil;
import com.six.core.vo.Result;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * ClassName:UploadController
 * Description:
 * date:2022/9/29 19:29
 *
 * @since JDK 1.8
 */
@RestController //@Controller+@ResponseBody
@RequestMapping("remark")
public class UploadController {
    @PostMapping("upload")
    @ResponseBody
    public Result upload(MultipartFile file) throws Exception {
        String path = UploadUtil.ossUpload(file);
        return new Result(200, "上传成功", path);
    }
}
